<!doctype html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
	<!-- Required meta tags -->
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

	<link rel="shortcut icon" href="favicon.ico" th:href="@{/favicon.ico}">
	<!-- Bootstrap CSS -->
	<!-- Bootstrap -->
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css"
	      integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
	<script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>

	<link type="text/css" rel="stylesheet" href="css/style.css" th:href="@{/css/buttom/style.css}">
	<link rel="stylesheet" th:href="@{/css/newhome/index.css}">
	<link rel="stylesheet" th:href="@{/css/newhome/common.css}">
	<link rel="stylesheet" th:href="@{/css/newhome/layui.css}">

	<title>信息工程学院智慧党建云平台</title>
</head>

<body>
	<div class="container-fluid">
		<div class="row">
			<!-- 头部 -->
			<div class="header  .w">
				<img th:src="@{/img/images/picture/logo1.png}" style="width: 400px">
				<div class="navbt">
					<ul>
						<li><a target="_blank" href="/party-platform/admin/page/main">平台首页</a></li>
						<li><a target="_blank" href="/party-platform/admin/page/newslist">新闻中心</a></li>
						<li><a target="_blank" href="/party-platform/admin/page/study">宣传教育</a></li>
						<li><a target="_blank" href="/party-platform/login">党建管理</a></li>
					</ul>
				</div>
			</div>
			<!-- 头部 end-->
		</div>
	</div>


	<!-- banner -->

	<div id="demo" class="carousel slide content" data-ride="carousel">

		<!-- 指示符 -->
		<ul class="carousel-indicators">
			<li data-target="#demo" data-slide-to="0" class="active"></li>
			<li data-target="#demo" data-slide-to="1"></li>
			<li data-target="#demo" data-slide-to="2"></li>
			<li data-target="#demo" data-slide-to="3"></li>
		</ul>

		<!-- 轮播图片 -->
		<div class="carousel-inner">
			<div class="carousel-item " th:each="item,iterStat : ${mainTopPic}">
				<img th:src="${{item.newsPicture}}">
			</div>

			<div class="carousel-item active">
				<img th:src="@{/img/images/picture/banner.jpg}">
			</div>
			<!--			<div class="carousel-item">-->
			<!--				<img th:src="@{/img/images/picture/banner1.jpg}">-->
			<!--			</div>-->
			<!--			<div class="carousel-item">-->
			<!--				<img th:src="@{/img/images/picture/banner.jpg}">-->
			<!--			</div>-->
		</div>

		<!-- 左右切换按钮 -->
		<a class="carousel-control-prev" href="#demo" data-slide="prev">
			<span class="carousel-control-prev-icon"></span>
		</a>
		<a class="carousel-control-next" href="#demo" data-slide="next">
			<span class="carousel-control-next-icon"></span>
		</a>

	</div>
	<!-- end -->
	<div class="content-area">
		<!-- 第一行 -->
		<div class="row mb10">
			<div class=" col-lg-6 col-md-6">
				<div class="card">
					<div class="container">
						<div id="demo1" class="carousel slide" data-ride="carousel">
							<!-- 指示符 -->
							<ul class="carousel-indicators">
								<li data-target="#demo1" data-slide-to="0" class="active"></li>
								<li data-target="#demo1" data-slide-to="1"></li>
								<li data-target="#demo1" data-slide-to="2"></li>
								<li data-target="#demo1" data-slide-to="3"></li>
							</ul>
							<!-- 轮播图片 -->
							<div class="carousel-inner">
								<div class="carousel-item" th:classappend="${{iterStat.index == 0}} ? 'active' : '' "
								     th:each="item,iterStat : ${mainPic}">
									<a href="/party-platform/admin/page/news?newsid=' + item[j][i].newsId + '"
									   th:href="${{item.newsUrl}}"
									   target="_blank">
										<img th:src="${{item.newsPicture}}">
									</a>
									<div class="carousel-caption">
										<p th:text="${{item.newsTitle}}">一些描述一些描述一些描述一些描述</p>
									</div>
								</div>
							</div>
							<!-- 左右切换按钮 -->
							<a class="carousel-control-prev" href="#demo1" data-slide="prev">
								<span class="carousel-control-prev-icon"></span>
							</a>
							<a class="carousel-control-next" href="#demo1" data-slide="next">
								<span class="carousel-control-next-icon"></span>
							</a>
						</div>
					</div>
				</div>
			</div>
			<!-- 红色新闻 -->
			<div class=" col-lg-6 col-md-6">
				<div class="card">
					<div class="card-header border-bottom">
						<h5 class="card-title cardtitles">新闻列表</h5>
					</div>
					<div class="card-body">

						<div class="layui-row">
							<div class="layui-col-xs12" id="news">

								<!--动态添加-->

							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 第二行 -->
		<div class="row mb10">

			<!-- 党建纪实 -->
			<div class=" col-lg-6 col-md-6">
				<div class="card">
					<div class="card-header border-bottom">
						<h5 class="card-title cardtitles">宣传教育</h5>
					</div>
					<div class="card-body">

						<div class="layui-row">
							<div class="layui-col-xs12" id="newsDocutry">
								<!--动态添加-->

							</div>
						</div>
					</div>
				</div>
			</div>
			<div class=" col-lg-4 col-md-4">
				<div class="card" th:each="item,iterStat : ${prePerson}">
					<div class="card-header border-bottom">
						<h5 class="card-title cardtitles">先进个人</h5>
					</div>
					<a href="/party-platform/admin/page/news?newsid=' + item[j][i].newsId + '"
					   th:href="'/party-platform/admin/page/news?newsid='+${{item.newsId}}" target="_blank">
						<div class="card-body" style="text-align: center; height: 300px;">
							<div style="display: block; ">
								<img src="./static/images/1.png" th:src="${{item.newsPicture}}" alt=""
								     style="width:280px; height: 230px; border-radius: 10px; box-shadow: 5px 5px 5px rgb(231, 231, 231);">
								<p style="text-align:left;margin-top: 10px; font-size: 15px; font-weight: 200spx; color: #000000; font-family: 微软雅黑; overflow: hidden; height: 60px;"
								   th:text="${{item.newsTitle}}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介一些简介</p>
							</div>
						</div>
					</a>
				</div>
			</div>

			<!-- 专题荟萃 -->
			<div class=" col-lg-2 col-md-2">
				<div class="">
					<div class="zhuanti">
						<ui class="zhuanti_mode modefont">
							<a class="" href="https://www.xuexi.cn/index.html" target="_blank"></a>
							<a class="" href="http://www.12371.cn/" target="_blank"></a>
							<a class="" href="http://www.jsxf.gov.cn/jsxf/" target="_blank"></a>
							<a class="" href="http://news.jschina.com.cn/zt2021/202101/t20210119_2712837.shtml"
							   target="_blank"></a>
							<a class="" href="http://cpc.people.com.cn/GB/67481/435238/index.html" target="_blank"></a>
						</ui>
					</div>
				</div>
			</div>
		</div>

		<!-- 专题banner -->
		<div id="myCarousel" class="carousel slide">
			<div class="full-width-image-team">
			</div>
		</div>
		<!-- 3 -->
		<div class="row mb10">
			<div class=" col-lg-12 col-md-12 reddemo">
				<section class="pc-banner">
					<div class="swiper-container">
						<div class="swiper-wrapper" id="wrapper-pic">
							<!--							<div class="swiper-slide swiper-slide-center none-effect">-->
							<!--								<a href="#">-->
							<!--									<img src="img/banner001.jpg" th:src="@{/img/buttom/banner001.jpg}">-->
							<!--								</a>-->
							<!--								<div class="layer-mask"></div>-->
							<!--							</div>-->
							<!--							<div class="swiper-slide">-->
							<!--								<a href="#">-->
							<!--									<img src="img/banner002.jpg" th:src="@{/img/buttom/banner002.jpg}">-->
							<!--								</a>-->
							<!--								<div class="layer-mask"></div>-->
							<!--							</div>-->
							<!--							<div class="swiper-slide">-->
							<!--								<a href="#">-->
							<!--									<img src="img/banner003.jpg" th:src="@{/img/buttom/banner003.jpg}">-->
							<!--								</a>-->
							<!--								<div class="layer-mask"></div>-->
							<!--							</div>-->
							<!--							<div class="swiper-slide">-->
							<!--								<a href="#">-->
							<!--									<img src="img/banner004.jpg" th:src="@{/img/buttom/banner004.jpg}">-->
							<!--								</a>-->
							<!--								<div class="layer-mask"></div>-->
							<!--							</div>-->
							<!--							<div class="swiper-slide">-->
							<!--								<a href="#">-->
							<!--									<img src="img/banner005.jpg" th:src="@{/img/buttom/banner005.jpg}" style="height: 700;width: 1200">-->
							<!--								</a>-->
							<!--								<div class="layer-mask"></div>-->
							<!--							</div>-->
						</div>
						<div class="button">
							<div class="swiper-button-prev"></div>
							<div class="swiper-button-next"></div>
						</div>
					</div>
				</section>


				<div class="">

					<div class="tab">
						<ul class="xcjyhead">
						</ul>
					</div>
					<div class="thoughtCon clearfix">
						<div class="newser" id="outNews">
							<!--动态添加-->
						</div>
						<a target="_blank" href="/party-platform/admin/page/study" class="more">查看更多 ></a>
					</div>
				</div>
			</div>
		</div>

	</div>


	<!--底部-->
	<div class="b_footer">
		<div class="b_foot">
			<div class="footnav">
				单位：盐城师范学院信息工程学院

			</div>
		</div>
	</div>
	<!--底部end-->


	<!-- Optional JavaScript -->
	<!-- jQuery first, then Popper.js, then Bootstrap JS -->
	<script src="../../static/js/jquery-3.4.1.min.js" th:src="@{/js/jquery-3.4.1.min.js}"
	        type="text/javascript"></script>
	<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
	        integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous">
	</script>
	<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"
	        integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous">
	</script>
	<script>
		//tab切换
		$(".tab li").each(function (index) {
			$(this).mouseover(function (e) {
				$(this).addClass("tabNavList").siblings().removeClass("tabNavList");
				$(".thoughtCon").eq(main).show().siblings(".thoughtCon").hide();
			})
		});

		// layui.use('carousel', function () {
		//     var carousel = layui.carousel;
		//     //建造实例
		//     carousel.render({
		//         elem: '#test1',
		//         width: '100%' //设置容器宽度
		//             ,
		//         arrow: 'always' //始终显示箭头
		//         //,anim: 'updown' //切换动画方式
		//     });
		// });
	</script>

	<script>

		//获取党建纪实列表
		$(document).ready(function () {
			$.ajax({
				url: "/party-platform/mainPage/allDocuments",
				type: "POST",
				contentType: "application/json; charset=utf-8",
				dataType: 'json',
				async: true,
				success: function (result) {
					let containerwrapper = $("#newsDocutry");

					let item = result;
					// console.info(item);
					let maxsize;
					if (item.length < 10) {
						maxsize = item.length;
					} else {
						maxsize = 10;
					}
					for (let i = 0; i < maxsize; i++) {

						containerwrapper.append(
							'<div class="layui-col-xs12 textHei mb10">' +
							'<a href="/party-platform/admin/page/news?documentaryId=' + item[i].documentaryId + '" target="_blank">' +
							'<div class="layui-col-xs2 widthLi ">' +
							'<span class="">' + '</span>' + '【宣传教育】' +
							'</div>' +
							'<div class="layui-col-xs7 overHid colorBig  bigBox">' + item[i].documentaryTitle
							+ '</div>'
							+ '<div class="layui-col-xs3 colorMore textRight widthTwo">' + changeDateFormat("yyyy-mm-dd", item[i].documentaryStartTime) + '</div>'
							+ '</a>'
							+ '</div>'
						)


					}
				}
			})
		})


		//获取新闻列表
		$(document).ready(function () {
			$.ajax({
				url: "/party-platform/mainPage/allNews",
				type: "POST",
				contentType: "application/json; charset=utf-8",
				dataType: 'json',
				async: true,
				success: function (result) {
					let containerwrapper = $("#news");

					let item = result;
					for (let j = 0; j < item.length; j++) {
						let maxsize;
						if (item[j].length < 5) {
							maxsize = item[j].length;
						} else {
							maxsize = 5;
						}

						for (let i = 0; i < maxsize; i++) {
							if (item[j][i].newsType == "先进事迹") {
								continue;
							}
							containerwrapper.append(
								'<div class="layui-col-xs12 textHei mb10">' +
								'<a href="' + item[j][i].newsUrl + '"target="_blank">' +
								'<div class="layui-col-xs2 widthLi ">' +
								'<span class="">' + '</span>' + '【' + item[j][i].newsType + '】' +
								'</div>'
								+ '<div class="layui-col-xs7 overHid colorBig  bigBox">' + item[j][i].newsTitle
								+ '</div>'
								+ '<div class="layui-col-xs3 colorMore textRight widthTwo">' + changeDateFormat("yyyy-mm-dd", item[j][i].newsTime) + '</div>'
								+ '</a>'
								+ '</div>'
							)
						}
					}
				}
			})
		})

		function changeDateFormat(format, cellval) {
			let s = cellval.toString();
			if (format === ("yyyy-mm-dd")) {
				return s.slice(0, 10);
			} else if (format === ("yyyy-mm-dd hh-mm-ii")) {
				return s;
			} else {
				return cellval
			}
		}

		let dataName;

		function getLable(valu) {
			$.ajax({
				url: "/party-platform/mainPage/dictValue?type=" + valu, // url where to submit the request
				type: "GET", // type of action POST || GET
				sync: false,
				success: function (result) {
					// console.log(result);
					dataName = result.data;
					// console.log(dataName)
					return dataName;
					// console.log(data);
				},
				error: function (xhr, resp, text) {
					console.log(xhr, resp, text);
				}
			});

		}

	</script>

	<script>
		//获取外部生活照片
		$(document).ready(function () {
			$.ajax({
				url: "/party-platform/mainPage/getPicLive",
				type: "GET",
				contentType: "application/json; charset=utf-8",
				dataType: 'json',
				async: true,
				success: function (result) {
					let containerwrapper = $("#wrapper-pic");

					let item = result;
					// console.info(item);
					// item.reverse();
					// console.info(item);
					let maxsize;
					if (item.length < 9) {
						maxsize = item.length;
					} else {
						maxsize = 9;
					}
					for (let i = 0; i < maxsize; i++) {
						if (item[i].newsType == "1") {
							containerwrapper.append(
								'<div class="swiper-slide swiper-slide-center none-effect">' +
								'	<a href="#">' +
								'	<img src="' + item[i].newsPicture + '" >' +
								'	</a>' +
								'	<div class="layer-mask"></div>' +
								'</div>'
							)
						}
					}
				}
			})
		})

	</script>

	<script type="text/javascript" src="js/swiper.min.js" th:src="@{/js/buttom/swiper.min.js}"></script>
	<script type="text/javascript">

		window.onload = function () {
			var swiper = new Swiper('.swiper-container', {
				autoplay: false,
				speed: 1000,
				autoplayDisableOnInteraction: true,
				loop: true,
				centeredSlides: true,
				slidesPerView: 2,
				pagination: '.swiper-pagination',
				paginationClickable: true,
				prevButton: '.swiper-button-prev',
				nextButton: '.swiper-button-next',
				onInit: function (swiper) {
					// swiper.slides[2].classname = "swiper-slide swiper-slide-active";
				},
				breakpoints: {
					668: {
						slidesPerView: 1,
					}
				}
			});
		}


	</script>
</body>

</html>